// 任务请求类型
export interface TaskRequest {
  cronExpression: string
  serviceName: string
  serviceMethod: string
}

// 停止任务请求类型
export interface StopTaskRequest {
  serviceName: string
  serviceMethod: string
}

// 任务信息类型
export interface TaskInfo {
  serviceName: string
  serviceMethod: string
  cronExpression: string
  status: 'running' | 'stopped' | 'error'
  startTime?: string
  lastExecuteTime?: string
  nextExecuteTime?: string
}

// 系统日志类型
export interface SysLog {
  id: number
  logTime: string
  level: string
  thread: string
  logger: string
  message: string
  createTime: string
}

// 任务日志类型
export interface TaskLog {
  id: number
  timestamp: string
  serviceName: string
  serviceMethod: string
  status: 'success' | 'error'
  duration: number
  details: string
}

// 日志搜索参数类型
export interface LogSearchParams {
  serviceName?: string
  serviceMethod?: string
  status?: string
  page?: number
  size?: number
  startTime?: string
  endTime?: string
}

// API响应类型
export interface ApiResponse<T> {
  code: number
  msg: string
  data: T
}

// 分页响应类型
export interface PageResponse<T> {
  records: T[]
  total: number
  current: number
  size: number
}